home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / TECHNICA / COMPUTER / H254.ZIP / IRITSM3S.ZIP / POLY3D / PROGRAM.H < prev    next >
C/C++ Source or Header  |  1992-01-26  |  3KB  |  96 lines

  1. /*****************************************************************************
  2. * Definitions for the Poly3D program:                         *
  3. *****************************************************************************/
  4.  
  5. #ifndef POLY_3D_H
  6. #define POLY_3D_H
  7.  
  8. #include "irit_sm.h"
  9. #include "genmat.h"
  10. #include "iritprsr.h"
  11. #include "cagd_lib.h"
  12.  
  13. /* Name    of generic matric transformation saved by this program:    */
  14. #define GENERIC_MAT_FILE  "generic#.mat"   /* Generic mat file name to save. */
  15. #define GENERIC_GIF_FILE  "generic#.gif"   /* Generic gif file name to save. */
  16. #define GENERIC_PS_FILE   "generic#.ps"        /* Generic PS file name to save. */
  17.  
  18. /* The current NormalLength is divided by scaler to form real normal length: */
  19. #define NORMAL_DEFAULT_LENGTH    10
  20. #define NORMAL_SCALER_LENGTH    100
  21.  
  22. #define DEFAULT_COLOR        1      /* For objects with no color defined. */
  23.  
  24. #define VIEW_PERSPECTIVE    1                  /* View modes. */
  25. #define VIEW_ORTHOGRAPHIC    2
  26. #define DEFAULT_PERSPECTIVE_Z    -5.0           /* Default Z focal point. */
  27.  
  28. #define TRANS_SCREEN    1     /* Screen, Object coords. transformation mode. */
  29. #define TRANS_OBJECT    2
  30.  
  31. #define DEFAULT_NUM_OF_ISOLINES        10
  32. #define DEFAULT_SAMPLES_PER_CURVE    6
  33.  
  34. /* Some external variables defined for all the programs: */
  35.  
  36. extern char
  37. #ifdef __GL__
  38.     *TransPrefPos,
  39.     *ViewPrefPos,
  40. #endif /* __GL__ */
  41. #ifdef __MSDOS__
  42.     *GlblViewWndwPos,
  43.     *GlblTransWndwPos,
  44.     *GlblStatusWndwPos,
  45.     *GlblInputWndwPos,
  46.     *GlblIntrSaveDisk,
  47. #endif /* __MSDOS__ */
  48.     GlblFirstDataFileName[];            /* Hold name of first data file. */
  49.  
  50. extern int
  51. #ifdef __MSDOS__
  52.     GlblWindowFrameWidth,
  53.     GlblViewFrameColor,
  54.     GlblViewBackColor,                                                             GlblTransFrameColor,
  55.     GlblTransBackColor,
  56.     GlblStatusFrameColor,
  57.     GlblStatusBackColor,
  58.     GlblInputFrameColor,
  59.     GlblInputBackColor,
  60.     GlblDrawHeader,
  61.     GlblSmoothTextScroll,
  62.     GlblIntrSaveMethod,
  63. #endif /* __MSDOS__ */
  64.     GlblInternal,
  65.     GlblMore,
  66.     GlblDrawVNormal,
  67.     GlblDrawPNormal,
  68.     GlblNumEdges,
  69.     GlblMouseExists,
  70.     GlblMouseSensitivity,
  71.     GlblJoystickExists,
  72.     GlblGraphDriver,
  73.     GlblClosedObject,
  74.     GlblDrawSurfaceMesh,
  75.     GlblNumOfIsolines,
  76.     GlblSamplesPerCurve,
  77.     GlblTransformMode,              /* Screen, Object coords. trans. mode. */
  78.     GlblViewMode,               /* Perspective, Orthographic etc. */
  79.     GlblDepthCue,                   /* Activate depth cueing. */
  80.     GlblDrawSolid;             /* Use hardware Z buffer rendering. */
  81.  
  82. extern RealType GlblNormalLen;             /* Scaler for normals if drawn. */
  83. extern MatrixType CrntViewMat;            /* This is the current view! */
  84.  
  85. /* And finally Poly3D module prototypes: */
  86. IPPolygonStruct *ProcessSurfaces(CagdCrvStruct *Crvs, CagdSrfStruct *Srfs);
  87. IPPolygonStruct *Surface2Polygons(CagdSrfStruct *Srf);
  88. VoidPtr MyMalloc(unsigned size);
  89. void MyFree(VoidPtr p);
  90. void MyExit(int ExitCode);
  91.  
  92. /* PostScrp module: */
  93. void SavePostScript(IPObjectStruct *Objects);
  94.  
  95. #endif /* POLY_3D_H */
  96.